﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="VesselEdit.aspx.cs" Inherits="VesselEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table style="border-collapse: separate !important; border-spacing: 5px;">
        <tr>
            <td>
                <asp:Label ID="lblName" Text="Title" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtName" ClientIDMode="Static" runat="server" CssClass="textbox" /></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblBeam" Text="Beam" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtBeam" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType1" runat="server" ControlToValidate="txtBeam" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator><br />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblDepth" Text="Depth" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtDepth" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType2" runat="server" ControlToValidate="txtDepth" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblImo" Text="IMO" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtImo" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType3" runat="server" ControlToValidate="txtImo" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblLoa" Text="LOA" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtLoa" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType4" runat="server" ControlToValidate="txtLoa" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblGross" Text="Gross" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtGross" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType5" runat="server" ControlToValidate="txtGross" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblDeadweight" Text="Deadweight" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtDeadweight" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="cmprValidatorDoubleType6" runat="server" ControlToValidate="txtDeadweight" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblDraft" Text="Draft" runat="server" /></td>
            <td>
                <asp:TextBox ID="txtDraft" ClientIDMode="Static" runat="server" CssClass="textbox" />
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtDraft" Type="Double" Display="Dynamic" Operator="DataTypeCheck"
                    ErrorMessage="* Not a valid number."></asp:CompareValidator></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblSbt" Text="SBT" runat="server" Visible="false" /></td>
            <td>
                <asp:CheckBox ID="IsSbt" Text="   SBT" runat="server" /></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblVesselType" Text="Vessel Type" runat="server" /></td>
            <td>
                <asp:DropDownList ID="ddlVesselTypes" CssClass="textbox" runat="server" DataSourceID="VesselTypesDS" DataTextField="Name" DataValueField="VesselTypeID">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblFlag" Text="Flag" runat="server" /></td>
            <td>
                <asp:DropDownList ID="ddlFlags" CssClass="textbox" runat="server" DataSourceID="FlagsDS" DataTextField="Name" DataValueField="FlagID">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="lblCreateDate" runat="server" Visible="false"></asp:Label></td>
        </tr>
    </table>
    <br />
    <asp:Label ID="lblBeginDate" Text="Begin Date" runat="server" /><br />
    <csc:DateTextBox ID="txtBeginDate" CssClass="textbox" ClientIDMode="Static" runat="server"></csc:DateTextBox>
    <asp:RegularExpressionValidator ID="revBeginDate" ControlToValidate="txtBeginDate" EnableClientScript="true"
        ValidationExpression='<%$ Resources:Global, DateRegex%>' runat="server" ErrorMessage="*"></asp:RegularExpressionValidator>
    <br />
    <br />
    <asp:Button ID="btnSave" Text="Save" CssClass="button_pink" runat="server" OnClick="btnSave_Click" />

    <asp:Label ID="lblError" runat="server"></asp:Label>

    <asp:ObjectDataSource ID="VesselTypesDS" runat="server" SelectMethod="GetAll" TypeName="DAL.DBManagers.VesselTypesManager"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="FlagsDS" runat="server" SelectMethod="GetAll" TypeName="DAL.DBManagers.FlagsManager"></asp:ObjectDataSource>
</asp:Content>

